<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="记录个人生活">
  
  <title>
    
    Gejin_Blog
  </title>
  
    <link rel="shortcut icon" href="/hexo-application/favicon.ico">
    
  
<link rel="stylesheet" href="/hexo-application/css/style.css">

  
  
<link rel="stylesheet" href="/hexo-application/fancybox/jquery.fancybox.min.css">

  
  
<script src="/hexo-application/js/pace.min.js"></script>

<meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/hexo-application/atom.xml" title="Gejin_Blog" type="application/atom+xml">
</head>

<body>
  <main class="content">
    <section class="jumbotron">
  <div class="video">
    
    <div class="video-frame">
      <img src="/hexo-application/images/ocean/overlay-hero.png" alt="Decorative image frame">
    </div>
    
    <div class="video-media">
      <video playsinline="" autoplay="" loop="" muted="" data-autoplay="" poster="/hexo-application/images/ocean/ocean.png"
        x5-video-player-type="h5">
        <source src="/hexo-application/images/ocean/ocean.mp4" type="video/mp4">
        <source src="/hexo-application/images/ocean/ocean.ogv" type="video/ogg">
        <source src="/hexo-application/images/ocean/ocean.webm" type="video/webm">
        <p>Your user agent does not support the HTML5 Video element.</p>
      </video>
      <div class="video-overlay"></div>
    </div>
    <div class="video-inner text-center text-white">
      <h1><a href="/hexo-application/">Gejin_Blog</a></h1>
      <p>用于记录生活的个人博客网站</p>
      <div><img src="/hexo-application/images/hexo-inverted.svg" class="brand" alt="Gejin_Blog"></div>
    </div>
    <div class="video-learn-more">
      <a class="anchor" href="#landingpage"><i class="fe fe-mouse"></i></a>
    </div>
  </div>
</section>
<div id="landingpage">
  <section class="outer">
  <article class="articles">
    
    <h1 class="page-type-title"></h1>
    
    
    <article id="post-hello-world" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
      

<h2 itemprop="name">
  <a class="article-title" href="/hexo-application/2021/09/01/hello-world/">Hello World</a>
</h2>


<div class="article-topping">
  <i class="fe fe-umbrella"></i>
</div>


    </header>
    

    
    <div class="article-meta">
      <a href="/hexo-application/2021/09/01/hello-world/" class="article-date">
  <time datetime="2021-09-01T03:41:33.028Z" itemprop="datePublished">2021-09-01</time>
</a>
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      
      
        
<div class="article-gallery">
  <div class="article-gallery-photos">
    
    
    <a class="article-gallery-img" href="/hexo-application/2021/09/01/hello-world/" rel="gallery_ckt2qs9290003rk6wa14r04x2">
      <img src="/hexo-application/favicon.ico" itemprop="image">
    </a>
    
    
  </div>
</div>

      
      
      <p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">&quot;My New Post&quot;</span></span><br></pre></td></tr></table></figure>

<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>

<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>

<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>

<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://enticejin.github.io/2021/09/01/hello-world/" data-id="ckt2qs9290003rk6wa14r04x2" class="article-share-link">
        分享
      </a>
      
    </footer>

  </div>

  

  

</article>
    
    <article id="post-hexo_search_bug" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
      

<h2 itemprop="name">
  <a class="article-title" href="/hexo-application/2021/09/02/hexo_search_bug/">hexo_search部署到github上报找不到 “/js/search.js”</a>
</h2>



    </header>
    

    
    <div class="article-meta">
      <a href="/hexo-application/2021/09/02/hexo_search_bug/" class="article-date">
  <time datetime="2021-09-02T09:30:05.783Z" itemprop="datePublished">2021-09-02</time>
</a>
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      
      
        
      
      
      <h1 id="部署到github上报找不到-“-js-search-js”解决办法"><a href="#部署到github上报找不到-“-js-search-js”解决办法" class="headerlink" title="部署到github上报找不到 “/js/search.js”解决办法"></a>部署到github上报找不到 “/js/search.js”解决办法</h1><pre><code><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">删除jquery-2.0.3.min.js中头部</span><br><span class="line">//@ sourceMappingURL=jquery.min.map</span><br><span class="line">更改ocean.js中的</span><br><span class="line"> // 建议在移动端不初始化，其实 /search.xml 文件还挺大的，大概在文件第60行</span><br><span class="line"> //hexo-application这个是你的github项目名称，统一替换掉</span><br><span class="line">  if ($(&#x27;.local-search&#x27;).size() &amp;&amp; !isMobile.any()) &#123;</span><br><span class="line">    $.getScript(&#x27;/hexo-application/js/search.js&#x27;, function () &#123;</span><br><span class="line">      searchFunc(&quot;/hexo-application/search.xml&quot;, &#x27;local-search-input&#x27;, &#x27;local-search-result&#x27;);</span><br><span class="line">    &#125;);</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>
</code></pre>
<h1 id="Ocean"><a href="#Ocean" class="headerlink" title="Ocean"></a>Ocean</h1><p>Ocean is a mobile-enabled Hexo theme based on the features in Hexo’s default theme landscape. Since I am a Designer and not a Coder, so please advise! I am very grateful to <a target="_blank" rel="noopener" href="https://github.com/youchen1992">youchen1992</a> for providing technical support during the Ocean production process.</p>
<p><a target="_blank" rel="noopener" href="https://zhwangart.github.io/">Preview</a></p>
<p><a target="_blank" rel="noopener" href="https://zhwangart.github.io/2018/11/30/Ocean/">中文说明</a></p>
<p><img src="/hexo-application/screenshots/hexo-theme-ocean.jpg" alt="Screenshot"></p>
<h2 id="Install"><a href="#Install" class="headerlink" title="Install"></a>Install</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ git <span class="built_in">clone</span> https://github.com/zhwangart/hexo-theme-ocean.git themes/ocean</span><br></pre></td></tr></table></figure>

<h2 id="Enable"><a href="#Enable" class="headerlink" title="Enable"></a>Enable</h2><p>Modify <code>theme</code> setting in <code>_config.yml</code> to <code>ocean</code></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme:</span> <span class="string">ocean</span></span><br></pre></td></tr></table></figure>

<h2 id="Update"><a href="#Update" class="headerlink" title="Update"></a>Update</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> themes/ocean</span><br><span class="line">git pull</span><br></pre></td></tr></table></figure>

<h2 id="Configuration"><a href="#Configuration" class="headerlink" title="Configuration"></a>Configuration</h2><p>let me know if you can’t find something.</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Menu</span></span><br><span class="line"><span class="attr">menu:</span></span><br><span class="line">  <span class="attr">Home:</span> <span class="string">/</span></span><br><span class="line">  <span class="attr">Archives:</span> <span class="string">/archives</span></span><br><span class="line">  <span class="attr">Gallery:</span> <span class="string">/gallery</span></span><br><span class="line">  <span class="attr">About:</span> <span class="string">/about</span></span><br><span class="line">  <span class="attr">Links:</span> <span class="string">/links</span></span><br><span class="line"><span class="attr">rss:</span> <span class="string">/atom.xml</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Miscellaneous</span></span><br><span class="line"><span class="attr">favicon:</span> <span class="string">/favicon.ico</span></span><br><span class="line"><span class="attr">brand:</span> <span class="string">/images/hexo.svg</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Ocean Video</span></span><br><span class="line"><span class="comment"># Because I put videos in multiple formats on the same path, I just labeled the path here.</span></span><br><span class="line"><span class="attr">ocean:</span></span><br><span class="line">  <span class="attr">overlay:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">images/ocean/</span>      <span class="comment"># Video storage path, formats: mp4/ogg/webm</span></span><br><span class="line">  <span class="attr">brand:</span> <span class="string">/images/hexo-inverted.svg</span>      <span class="comment"># Optional, a small logo</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Content</span></span><br><span class="line"><span class="attr">excerpt_link:</span> <span class="string">Read</span> <span class="string">More...</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># fancybox</span></span><br><span class="line"><span class="attr">fancybox:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Local search</span></span><br><span class="line"><span class="attr">search_text:</span> <span class="string">Search</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Gitalk</span></span><br><span class="line"><span class="attr">gitalk:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">clientID:</span> <span class="comment"># GitHub Application Client ID</span></span><br><span class="line">  <span class="attr">clientSecret:</span> <span class="comment"># Client Secret</span></span><br><span class="line">  <span class="attr">repo:</span> <span class="comment"># Repository name</span></span><br><span class="line">  <span class="attr">owner:</span> <span class="comment"># GitHub ID</span></span><br><span class="line">  <span class="attr">admin:</span> <span class="comment"># GitHub ID</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Valine</span></span><br><span class="line"><span class="attr">valine:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">false</span>    <span class="comment"># Default: false.</span></span><br><span class="line">  <span class="attr">el:</span> <span class="string">&#x27;vcomments&#x27;</span>    <span class="comment"># The DOM element to be mounted on initialization.</span></span><br><span class="line">  <span class="attr">appId:</span>    <span class="comment"># Application appId from Leancloud.</span></span><br><span class="line">  <span class="attr">appKey:</span>    <span class="comment"># Application appKey from Leancloud.</span></span><br><span class="line">  <span class="attr">notify:</span> <span class="literal">false</span>    <span class="comment"># Mail notifier, Default: false.</span></span><br><span class="line">  <span class="attr">verify:</span> <span class="literal">true</span>    <span class="comment"># Validation code, Default: true.</span></span><br><span class="line">  <span class="attr">avatar:</span> <span class="string">&#x27;mp&#x27;</span>    <span class="comment"># Gravatar type.</span></span><br><span class="line">  <span class="attr">pageSize:</span> <span class="string">&#x27;10&#x27;</span>    <span class="comment"># Number of pages per page.</span></span><br><span class="line">  <span class="attr">placeholder:</span> <span class="string">&#x27;请输入...&#x27;</span>    <span class="comment"># Comment box placeholders.</span></span><br></pre></td></tr></table></figure>

<p>The <a target="_blank" rel="noopener" href="https://feathericon.com/">feathericon</a> in the menu is programmed ordely in “CSS <code>source/css/_partial/navbar.styl</code> “ and can be changed or added if needed.</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.nav-item</span></span><br><span class="line">  &amp;<span class="selector-pseudo">:nth-child</span>(<span class="number">1</span>)         // home</span><br><span class="line">    <span class="selector-class">.nav-item-link</span></span><br><span class="line">      &amp;<span class="selector-pseudo">::before</span></span><br><span class="line">        <span class="attribute">content</span> &#x27;\f12f&#x27;</span><br><span class="line">  &amp;<span class="selector-pseudo">:nth-child</span>(<span class="number">2</span>)         // archives</span><br><span class="line">    <span class="selector-class">.nav-item-link</span></span><br><span class="line">      &amp;<span class="selector-pseudo">::before</span></span><br><span class="line">        <span class="attribute">content</span> &#x27;\f12a&#x27;</span><br><span class="line">  //&amp;<span class="selector-pseudo">:nth-child</span>(<span class="number">3</span>)         // gallery</span><br><span class="line">  //  <span class="selector-class">.nav-item-link</span></span><br><span class="line">  //    &amp;<span class="selector-pseudo">::before</span></span><br><span class="line">  //      <span class="attribute">content</span> &#x27;\f1a9&#x27;</span><br><span class="line">  //&amp;<span class="selector-pseudo">:nth-child</span>(<span class="number">4</span>)         // about</span><br><span class="line">  //  <span class="selector-class">.nav-item-link</span></span><br><span class="line">  //    &amp;<span class="selector-pseudo">::before</span></span><br><span class="line">  //      <span class="attribute">content</span> &#x27;\f174&#x27;</span><br></pre></td></tr></table></figure>

<h2 id="Plugins"><a href="#Plugins" class="headerlink" title="Plugins"></a>Plugins</h2><ul>
<li><p><a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-theme-landscape">hexo-generator-search</a> Local search</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">$</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-generator-searchdb</span> <span class="string">--save</span></span><br></pre></td></tr></table></figure>
<p>Then add the plugin configuration for hexo’s configuration file <code>_config.yml</code> (note: not the theme’s configuration file):</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Hexo-generator-search</span></span><br><span class="line"><span class="attr">search:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">search.xml</span></span><br><span class="line">  <span class="attr">field:</span> <span class="string">post</span></span><br><span class="line">  <span class="attr">format:</span> <span class="string">html</span></span><br></pre></td></tr></table></figure></li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-generator-feed">hexo-generate-feed</a> RSS</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">$</span> <span class="string">npm</span> <span class="string">install</span> <span class="string">hexo-generator-feed</span> <span class="string">--save</span></span><br></pre></td></tr></table></figure>

<p>Then add the plugin configuration for hexo’s configuration file <code>_config.yml</code> (note: not the theme’s configuration file):</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">feed:</span></span><br><span class="line">    <span class="attr">type:</span> <span class="string">atom</span></span><br><span class="line">    <span class="attr">path:</span> <span class="string">atom.xml</span></span><br><span class="line">    <span class="attr">limit:</span> <span class="number">20</span></span><br><span class="line">    <span class="attr">hub:</span></span><br><span class="line">    <span class="attr">content:</span></span><br><span class="line">    <span class="attr">content_limit:</span> <span class="number">140</span></span><br><span class="line">    <span class="attr">content_limit_delim:</span> <span class="string">&#x27; &#x27;</span></span><br><span class="line">    <span class="attr">order_by:</span> <span class="string">-date</span>	</span><br></pre></td></tr></table></figure></li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/netcan/hexo-generator-index-pin-top">hexo-generator-index-pin-top</a></p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm uninstall hexo-generator-index --save</span><br><span class="line">$ npm install hexo-generator-index-pin-top --save</span><br></pre></td></tr></table></figure></li>
</ul>
<h2 id="Post-poster"><a href="#Post-poster" class="headerlink" title="Post poster"></a>Post poster</h2><figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: Post name</span><br><span class="line"></span><br><span class="line">photos: [</span><br><span class="line"><span class="code">        [&quot;img_url&quot;],</span></span><br><span class="line"><span class="code">        [&quot;img_url&quot;]</span></span><br><span class="line"><span class="code">        ]</span></span><br><span class="line"><span class="code">---</span></span><br></pre></td></tr></table></figure>

<h2 id="Gallery"><a href="#Gallery" class="headerlink" title="Gallery"></a>Gallery</h2><p>Need to write in the head of the markdown, this is not a good way to write, I hope to get a better way to write on github.</p>
<figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: Gallery</span><br><span class="line"></span><br><span class="line">albums: [</span><br><span class="line"><span class="code">        [&quot;img_url&quot;,&quot;img_caption&quot;],</span></span><br><span class="line"><span class="code">        [&quot;img_url&quot;,&quot;img_caption&quot;]</span></span><br><span class="line"><span class="code">        ]</span></span><br><span class="line"><span class="code">---</span></span><br></pre></td></tr></table></figure>

<h2 id="Toc"><a href="#Toc" class="headerlink" title="Toc"></a>Toc</h2><p>Use Tocbot to parse the title tags (h1~h6) in the content and insert the directory. </p>
<ul>
<li><p>ocean/_config.yml</p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Toc</span></span><br><span class="line"> toc: <span class="literal">true</span></span><br></pre></td></tr></table></figure></li>
<li><p>If Toc is turned on in ocean/_config.yml, then Tocbot will generate a Toc article directory in the title tag of each blog parsing content, but not all blogs require Toc, so in the Front-matter section of markdown Can be closed:</p>
  <figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line"> toc: false</span><br><span class="line"> ---</span><br></pre></td></tr></table></figure></li>
</ul>
<hr>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://enticejin.github.io/2021/09/02/hexo_search_bug/" data-id="ckt2qs92d0006rk6wg9fk1uet" class="article-share-link">
        分享
      </a>
      
    </footer>

  </div>

  

  

</article>
    
    <article id="post-hexo-Search" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
      

<h2 itemprop="name">
  <a class="article-title" href="/hexo-application/2021/09/02/hexo-Search/">hexo Search 官方文档</a>
</h2>



    </header>
    

    
    <div class="article-meta">
      <a href="/hexo-application/2021/09/02/hexo-Search/" class="article-date">
  <time datetime="2021-09-02T07:57:48.460Z" itemprop="datePublished">2021-09-02</time>
</a>
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      
      
        
<div class="article-gallery">
  <div class="article-gallery-photos">
    
    
    <a class="article-gallery-img" href="/hexo-application/2021/09/02/hexo-Search/" rel="gallery_ckt2qs92c0005rk6w4v5b37w5">
      <img src="/hexo-application/images/zhongqiu.jpeg" itemprop="image">
    </a>
    
    
  </div>
</div>

      
      
      <h1 id="hexo-generator-searchdb"><a href="#hexo-generator-searchdb" class="headerlink" title="hexo-generator-searchdb"></a>hexo-generator-searchdb</h1><p><a target="_blank" rel="noopener" href="https://github.com/next-theme/hexo-generator-searchdb/actions?query=workflow:Linter"><img src="https://img.shields.io/github/workflow/status/next-theme/hexo-generator-searchdb/Linter?style=flat-square" alt="Build Status"></a><br><a target="_blank" rel="noopener" href="https://www.npmjs.com/package/hexo-generator-searchdb"><img src="https://img.shields.io/npm/v/hexo-generator-searchdb?style=flat-square" alt="npm-image"></a><br><a target="_blank" rel="noopener" href="https://hexo.io/"><img src="https://img.shields.io/badge/hexo-%3E%3D%203.0-blue?style=flat-square" alt="hexo-image"></a><br><a href="LICENSE"><img src="https://img.shields.io/npm/l/hexo-generator-searchdb?style=flat-square" alt="lic-image"></a></p>
<p>Seach data generator plugin for Hexo.</p>
<p>This plugin is used for generating a search index file, which contains all the necessary data of your articles that you can use to write a local search engine for your blog. Supports both XML and JSON format output.</p>
<h2 id="Install"><a href="#Install" class="headerlink" title="Install"></a>Install</h2><p><img src="https://img.shields.io/github/languages/code-size/next-theme/hexo-generator-searchdb?style=flat-square" alt="size-image"><br><a target="_blank" rel="noopener" href="https://www.npmjs.com/package/hexo-generator-searchdb"><img src="https://img.shields.io/npm/dm/hexo-generator-searchdb?style=flat-square" alt="dm-image"></a><br><a target="_blank" rel="noopener" href="https://www.npmjs.com/package/hexo-generator-searchdb"><img src="https://img.shields.io/npm/dt/hexo-generator-searchdb?style=flat-square" alt="dt-image"></a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-generator-searchdb</span><br></pre></td></tr></table></figure>

<h2 id="Options"><a href="#Options" class="headerlink" title="Options"></a>Options</h2><p>You can configure this plugin in your root <code>_config.yml</code>. All the arguments are optional.</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">search:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">search.xml</span></span><br><span class="line">  <span class="attr">field:</span> <span class="string">post</span></span><br><span class="line">  <span class="attr">content:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">format:</span> <span class="string">html</span></span><br></pre></td></tr></table></figure>

<ul>
<li><strong>path</strong> - file path. By default is <code>search.xml</code>. If the file extension is <code>.json</code>, the output format will be JSON. Otherwise XML format file will be exported.</li>
<li><strong>field</strong> - the search scope you want to search, you can chose:<ul>
<li><strong>post</strong> (Default) - will only cover all the posts of your blog.</li>
<li><strong>page</strong> - will only cover all the pages of your blog.</li>
<li><strong>all</strong> - will cover all the posts and pages of your blog.</li>
</ul>
</li>
<li><strong>content</strong> - whether contains the whole content of each article. If <code>false</code>, the generated results only cover title and other meta info without mainbody. By default is <code>true</code>.</li>
<li><strong>format</strong> - the form of the page contents, options are:<ul>
<li><strong>html</strong> (Default) - original html string being minified.</li>
<li><strong>striptags</strong> - original html string being minified, and remove all the tags.</li>
<li><strong>raw</strong> - markdown text of each posts or pages.</li>
</ul>
</li>
</ul>
<h2 id="FAQ"><a href="#FAQ" class="headerlink" title="FAQ"></a>FAQ</h2><h3 id="What’s-this-plugin-supposed-to-do"><a href="#What’s-this-plugin-supposed-to-do" class="headerlink" title="What’s this plugin supposed to do?"></a>What’s this plugin supposed to do?</h3><p>This plugin is used for generating a xml / json file from your Hexo blog that provides data for searching.</p>
<h3 id="Where’s-this-file-saved-to"><a href="#Where’s-this-file-saved-to" class="headerlink" title="Where’s this file saved to?"></a>Where’s this file saved to?</h3><p>After executing <code>hexo g</code> you will get the generated result at your public folder.</p>
<h3 id="How-to-use-this-plugin-in-my-Hexo-blog"><a href="#How-to-use-this-plugin-in-my-Hexo-blog" class="headerlink" title="How to use this plugin in my Hexo blog?"></a>How to use this plugin in my Hexo blog?</h3><p>You have two choices:</p>
<ul>
<li>you don’t want to write search engine by yourself. There are many themes that take use this plugin for local searching that works out of box.</li>
<li>you are familiar with fetch API or jQuery Ajax and would like to write your own search engine. You can implement one by yourself according to the theme NexT. Read the <a target="_blank" rel="noopener" href="https://github.com/next-theme/hexo-theme-next">source code</a> of this theme. Generally there are 3 steps:<ol>
<li>write a <a target="_blank" rel="noopener" href="https://github.com/next-theme/hexo-theme-next/blob/v8.0.0/layout/_partials/search/localsearch.njk">search view</a>. This is the place for displaying a search form and search results;</li>
<li>write a <a target="_blank" rel="noopener" href="https://github.com/next-theme/hexo-theme-next/blob/v8.0.0/source/js/local-search.js">search script</a>. This script tells the browser how to grab search data and filter out contents what we’re searching;</li>
<li>tell hexo to <a target="_blank" rel="noopener" href="https://github.com/next-theme/hexo-theme-next/blob/v8.0.0/layout/_third-party/search/localsearch.njk">connect the above two part</a>.</li>
</ol>
</li>
</ul>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://enticejin.github.io/2021/09/02/hexo-Search/" data-id="ckt2qs92c0005rk6w4v5b37w5" class="article-share-link">
        分享
      </a>
      
    </footer>

  </div>

  

  

</article>
    
    <article id="post-Git" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
      

<h2 itemprop="name">
  <a class="article-title" href="/hexo-application/2021/09/02/Git/">Git的一些相关问题</a>
</h2>



    </header>
    

    
    <div class="article-meta">
      <a href="/hexo-application/2021/09/02/Git/" class="article-date">
  <time datetime="2021-09-02T07:01:23.535Z" itemprop="datePublished">2021-09-02</time>
</a>
      
    </div>
    

    

    <div class="article-entry" itemprop="articleBody">
      
      
        
<div class="article-gallery">
  <div class="article-gallery-photos">
    
    
    <a class="article-gallery-img" href="/hexo-application/2021/09/02/Git/" rel="gallery_ckt2qs9260001rk6we8w0b4qs">
      <img src="/hexo-application/images/zhongqiu.jpeg" itemprop="image">
    </a>
    
    
  </div>
</div>

      
      
      <h1 id="Git的一些相关问题"><a href="#Git的一些相关问题" class="headerlink" title="Git的一些相关问题"></a>Git的一些相关问题</h1><h1 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">remote: Support <span class="keyword">for</span> password authentication was removed on August 13, 2021. Please use a personal access token instead.</span><br><span class="line">remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ <span class="keyword">for</span> more information.</span><br><span class="line">fatal: unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: The requested URL returned error: 403</span><br></pre></td></tr></table></figure>

<h1 id="解决办法"><a href="#解决办法" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#your_token 在github中生成的token</span></span><br><span class="line"><span class="comment">#USERNAME 在GitHub中的用户名（不是你的登录账号）</span></span><br><span class="line"><span class="comment">#REPO 仓库名</span></span><br><span class="line">git remote set-url origin https://&lt;your_token&gt;@github.com/&lt;USERNAME&gt;/&lt;REPO&gt;.git</span><br><span class="line"></span><br><span class="line">例如：</span><br><span class="line"> git remote set-url origin https://xxx@github.com/xxx/xxx.git</span><br></pre></td></tr></table></figure>
<h1 id="问题描述-1"><a href="#问题描述-1" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git pull origin master</span><br><span class="line">fatal: unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: Failed to connect to github.com port 443: Timed out</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-1"><a href="#解决办法-1" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global --<span class="built_in">unset</span> git.proxy</span><br></pre></td></tr></table></figure>
<h1 id="问题描述-2"><a href="#问题描述-2" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Push failed</span><br><span class="line">	Unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: OpenSSL SSL_read: Connection was reset, errno 10054</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-2"><a href="#解决办法-2" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global http.sslVerify <span class="string">&quot;false&quot;</span></span><br></pre></td></tr></table></figure>
<h1 id="问题描述-3"><a href="#问题描述-3" class="headerlink" title="问题描述"></a>问题描述</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Push failed</span><br><span class="line">	Unable to access <span class="string">&#x27;https://github.com/enticejin/python.git/&#x27;</span>: Failed to connect to github.com port 443: Timed out</span><br></pre></td></tr></table></figure>
<h1 id="解决办法-3"><a href="#解决办法-3" class="headerlink" title="解决办法"></a>解决办法</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">出现这种情况一般都是代理出了问题</span><br><span class="line">将C:\Windows\System32\drivers\etc文件夹下的HOSTS文件中的github.com删掉重新push</span><br></pre></td></tr></table></figure>
<h1 id="全部PUSH命令"><a href="#全部PUSH命令" class="headerlink" title="全部PUSH命令"></a>全部PUSH命令</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git add .</span><br><span class="line">git commit -m “your comment”</span><br><span class="line">git push -u origin master -f</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://enticejin.github.io/2021/09/02/Git/" data-id="ckt2qs9260001rk6we8w0b4qs" class="article-share-link">
        分享
      </a>
      
    </footer>

  </div>

  

  

</article>
    
  </article>
  

  
</section>
</div>
    <footer class="footer">
  <div class="outer">
    <div class="float-right">
      <ul class="list-inline">
  
  <li><i class="fe fe-bar-chart"></i> <span id="busuanzi_value_site_pv"></span></li>
  
  <li><i class="fe fe-smile-alt"></i> <span id="busuanzi_value_site_uv"></span></li>
  
</ul>
    </div>
    <ul class="list-inline">
      <li>Gejin_Blog &copy; 2021</li>
      
        <li>黔ICP备17054916号-2</li>
      
      <li>Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></li>
      <li>theme  <a target="_blank" rel="noopener" href="https://github.com/zhwangart/hexo-theme-ocean">Ocean</a></li>
    </ul>
  </div>
</footer>
  </main>
  <aside class="sidebar">
    <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/hexo-application/"><img src="/hexo-application/favicon.ico" alt="Gejin_Blog"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/gallery">相册</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/hexo-application/about">关于</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link nav-item-search" title="搜索">
        <i class="fe fe-search"></i>
        搜索
      </a>
    </li>
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      <div class="totop" id="totop">
  <i class="fe fe-rocket"></i>
</div>
    </li>
    <li class="nav-item">
      
      <a class="nav-item-link" target="_blank" href="/hexo-application/atom.xml" title="RSS Feed">
        <i class="fe fe-feed"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
  </aside>
  
<script src="/hexo-application/js/jquery-2.0.3.min.js"></script>


<script src="/hexo-application/js/jquery.justifiedGallery.min.js"></script>


<script src="/hexo-application/js/lazyload.min.js"></script>


<script src="/hexo-application/js/busuanzi-2.3.pure.min.js"></script>



<script src="/hexo-application/fancybox/jquery.fancybox.min.js"></script>




<script src="/hexo-application/js/copybtn.js"></script>




<script src="/hexo-application/js/ocean.js"></script>


  
<script src="/hexo-application/js/search.js"></script>


</body>

</html>